package com.examination.api.administrator;

import com.examination.framework.model.response.QueryResponseResult;
import com.examination.framework.model.response.ResponseResult;
import com.examination.system.administration.Department;
import com.examination.system.administration.response.AddAdministrationResult;
import com.examination.system.administration.response.DeleteAdministrationResult;
import io.swagger.annotations.*;

/**
 * @author 寇淇芮
 * @Date 2019/9/14 9:39
 */
@Api(value = "部门管理",description = "管理部门基本信息")
public interface DepartmentControllerApi {

    @ApiOperation("添加信息")
    @ApiImplicitParam(name = "department",value = "添加信息",required = true,paramType = "body",dataType = "Department")
    AddAdministrationResult addDepartment(Department department);

    @ApiOperation("删除部门基本信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name="departmentId",value = "部门id信息",paramType = "path",dataType = "String",required = true),
            @ApiImplicitParam(name = "newDepartmentName",value = "新的部门名称",paramType = "path",dataType="String",required = true),
            @ApiImplicitParam(name = "department",value = "部门详细信息",paramType = "body",dataType = "Department",required = false)
    })
    DeleteAdministrationResult deleteDepartmentById(String departmentId,String newDepartmentName,Department department);

    @ApiOperation("更新部门基本信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name="departmentId",value = "部门id信息",paramType = "path",dataType = "String",required = true),
            @ApiImplicitParam(name = "department",value = "部门详细信息",paramType = "body",dataType = "Department",required = true)
    })
    ResponseResult editDepartmentById(String departmentId,Department department);

    @ApiOperation("查询部门基本信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page", value = "页码", paramType = "path", dataType = "string", required = true),
            @ApiImplicitParam(name = "size", value = "每页显示的记录数", paramType = "path", dataType = "string", required = true),
            @ApiImplicitParam(name = "department",value = "部门详细信息",paramType = "body",dataType = "Department",required = false)
    })
    QueryResponseResult findDepartmentList(Integer page,Integer size,Department department);
    @ApiOperation("查询部门基本信息")
    QueryResponseResult findDepartmentList();
}
